
<html><HEAD>
<LINK REL=STYLESHEET HREF="default.css" TYPE="text/css">
<TITLE>
Copying controls </TITLE>
</HEAD>
<BODY>

<!-- Header -->
<p class="ancestor" align="right"><A HREF="pbugp105.htm">Previous</A>&nbsp;&nbsp;<A HREF="pbugp107.htm" >Next</A>
<!-- End Header -->
<A NAME="X-REF343931380"></A><h1>Copying controls </h1>
<A NAME="TI2815"></A><p>You can copy controls within a window or to other windows.
All properties of the control, as well as all of its scripts, are
copied. You can use this technique to make a copy of an existing
control and change what you want in the copy.</p>
<A NAME="TI2816"></A><p><img src="images/proc.gif" width=17 height=17 border=0 align="bottom" alt="Steps"> To copy a control:</p>
<ol><li class=fi><p>Select the control.</p></li>
<li class=ds><p>Select Edit&gt;Copy from the menu bar or
press Ctrl+C.</p><p>The control is copied to a private PowerBuilder clipboard.</p></li>
<li class=ds><p>Do one of the following:<A NAME="TI2817"></A>
<ul>
<li class=fi>To
copy the control within the same window, select Edit&gt;Paste Controls
from the menu bar or press Ctrl+V.</li>
<li class=ds>To copy the control to another window, click the
Open button in the PowerBar and open the window in another instance
of the Window painter. Make that window active and select Edit&gt;Paste
Controls from the menu bar or press Ctrl+V.<br>
If the control you are pasting has the same name as a control
that already exists in the window, the Paste Control Name Conflict
dialog box displays.<br>
</li>
</ul>

                    </p></li>
<li class=ds><p>If prompted, change the name of the pasted control
to be unique.</p><p>PowerBuilder pastes the control in the destination window
at the same location as in the source window. If you are pasting
into the same window, move the pasted control so it does not overlay
the original control. You can make whatever changes you want to
the copy; the source control will be unaffected.</p></li></ol>
<br>
